package search.ghost.asia;
import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class Search extends HttpServlet {

	private static final long serialVersionUID = 6054108750600509527L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		doPost(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("gb2312");
		String wd = request.getParameter("wd");
		wd = new String(wd.getBytes("ISO-8859-1"),"gb2312");
		request.setAttribute("wd", wd);
		request.getRequestDispatcher("result.jsp").forward(request, response);
	}

}
